
def multi_param(*args,**kwargs):
    print(args,kwargs)

# 注意键值对传参在最后面
multi_param(1,2,'qwe','eee',k1='v1',k2='v2')
multi_param(1,k1='v1',k2='v2')
multi_param(k1='v1',k2='v2')


def decorator(func):
    def wrapper(*args,**kwargs):
        test = "123123123123"
        print(args)
        print(kwargs)
        print("=================================开始==========================")
        z = func(*args,**kwargs)
        return test
    return wrapper



@decorator
def my_add2(a,b):
    return a+b

@decorator
def my_add3(a,b,c):
    return a+b+c

@decorator
def my_add_4(a,b,c,**kwargs):
    return a+b+c+kwargs['k1']

print(my_add2(1,3))
print(my_add3(1,2,3))
print(my_add_4(1,2,3,k1=4))